<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JCSDK C++ API Reference: 文件存储模块</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JCSDK C++ API Reference
   &#160;<span id="projectnumber">2.3.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#enum-members">枚举</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">文件存储模块</div>  </div>
</div><!--header-->
<div class="contents">

<p>用于上传下载文件  
<a href="#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage.html">JCStorage</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage_callback.html">JCStorageCallback</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_c_storage_item.html">JCStorageItem</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
枚举</h2></td></tr>
<tr class="memitem:ga40b7218f59d12deb9962cc0fdd036ff2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga40b7218f59d12deb9962cc0fdd036ff2">JCStorageReason</a> { <br />
&#160;&#160;<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2aeca33d3eb89c20fe459b8d72fd57667b">JCStorageReasonNone</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2a57a76aaa6ca7b283795cc5035f0e4ee1">JCStorageReasonNotLogin</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2a6049bcd1162391f0d5305204d84638ba">JCStorageReasonNetWork</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2a25a6dcb95feea6fee8f48421d00846af">JCStorageReasonTooLarge</a> = 30, 
<br />
&#160;&#160;<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2a7fdf5beb7217db17f5cbeebae4cc6dd7">JCStorageReasonTimeOut</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2ab57782e014dd3abff1305324a6b096de">JCStorageReasonExpire</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga40b7218f59d12deb9962cc0fdd036ff2a57d3bae776d11d00e1214962e2371a47">JCStorageReasonOther</a> = 100
<br />
 }</td></tr>
<tr class="separator:ga40b7218f59d12deb9962cc0fdd036ff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1e9ac690b4849a765d831a5c478ddc1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gac1e9ac690b4849a765d831a5c478ddc1">JCStorageItemState</a> { <br />
&#160;&#160;<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ggac1e9ac690b4849a765d831a5c478ddc1a0d3d80899dded540996f9dd5e33143d5">JCStorageItemStateInit</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ggac1e9ac690b4849a765d831a5c478ddc1a1e4cee4fa71de637f714312b9db206ea">JCStorageItemStateTransfering</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ggac1e9ac690b4849a765d831a5c478ddc1ab336ed63358e3a9ed7bb19476a72ac6b">JCStorageItemStateOK</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ggac1e9ac690b4849a765d831a5c478ddc1a18fb75843dbb6b6050cc1e027bf097d8">JCStorageItemStateFail</a>, 
<br />
&#160;&#160;<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ggac1e9ac690b4849a765d831a5c478ddc1a8caa013656fa3eab1b148d9bc84298c3">JCStorageItemStateCancel</a>
<br />
 }</td></tr>
<tr class="separator:gac1e9ac690b4849a765d831a5c478ddc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga80e1fc3ad6bab9b6c16d79e8a912206f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga80e1fc3ad6bab9b6c16d79e8a912206f">JCStorageItemDirection</a> { <a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga80e1fc3ad6bab9b6c16d79e8a912206faca288ae0245b773bf30d2928dfc9fc38">JCStorageItemDirectionUpload</a>, 
<a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gga80e1fc3ad6bab9b6c16d79e8a912206fa9576356c693836c7e572f6e3eac94bb1">JCStorageItemDirectionDownload</a>
 }</td></tr>
<tr class="separator:ga80e1fc3ad6bab9b6c16d79e8a912206f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ga73d635d6a613c3b631075cb71ebba63e"><td class="memItemLeft" align="right" valign="top">JCSDK_API <a class="el" href="class_j_c_storage.html">JCStorage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga73d635d6a613c3b631075cb71ebba63e">createJCStorage</a> (<a class="el" href="class_j_c_client.html">JCClient</a> *client, <a class="el" href="class_j_c_storage_callback.html">JCStorageCallback</a> *callback)</td></tr>
<tr class="separator:ga73d635d6a613c3b631075cb71ebba63e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b8c62e07d32edcd5aa30b0951449b59"><td class="memItemLeft" align="right" valign="top">JCSDK_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga4b8c62e07d32edcd5aa30b0951449b59">destroyJCStorage</a> ()</td></tr>
<tr class="separator:ga4b8c62e07d32edcd5aa30b0951449b59"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<p>用于上传下载文件 </p>
<h2 class="groupheader">枚举类型说明</h2>
<a id="ga80e1fc3ad6bab9b6c16d79e8a912206f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga80e1fc3ad6bab9b6c16d79e8a912206f">&#9670;&nbsp;</a></span>JCStorageItemDirection</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga80e1fc3ad6bab9b6c16d79e8a912206f">JCStorageItemDirection</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>文件传输方向 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="gga80e1fc3ad6bab9b6c16d79e8a912206faca288ae0245b773bf30d2928dfc9fc38"></a>JCStorageItemDirectionUpload&#160;</td><td class="fielddoc"><p>上传 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga80e1fc3ad6bab9b6c16d79e8a912206fa9576356c693836c7e572f6e3eac94bb1"></a>JCStorageItemDirectionDownload&#160;</td><td class="fielddoc"><p>下载 </p>
</td></tr>
</table>

</div>
</div>
<a id="gac1e9ac690b4849a765d831a5c478ddc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac1e9ac690b4849a765d831a5c478ddc1">&#9670;&nbsp;</a></span>JCStorageItemState</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#gac1e9ac690b4849a765d831a5c478ddc1">JCStorageItemState</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>文件传输状态枚举 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="ggac1e9ac690b4849a765d831a5c478ddc1a0d3d80899dded540996f9dd5e33143d5"></a>JCStorageItemStateInit&#160;</td><td class="fielddoc"><p>文件初始状态 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac1e9ac690b4849a765d831a5c478ddc1a1e4cee4fa71de637f714312b9db206ea"></a>JCStorageItemStateTransfering&#160;</td><td class="fielddoc"><p>文件传输中状态 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac1e9ac690b4849a765d831a5c478ddc1ab336ed63358e3a9ed7bb19476a72ac6b"></a>JCStorageItemStateOK&#160;</td><td class="fielddoc"><p>文件传输成功状态 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac1e9ac690b4849a765d831a5c478ddc1a18fb75843dbb6b6050cc1e027bf097d8"></a>JCStorageItemStateFail&#160;</td><td class="fielddoc"><p>文件传输失败状态 </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac1e9ac690b4849a765d831a5c478ddc1a8caa013656fa3eab1b148d9bc84298c3"></a>JCStorageItemStateCancel&#160;</td><td class="fielddoc"><p>文件传输取消状态 </p>
</td></tr>
</table>

</div>
</div>
<a id="ga40b7218f59d12deb9962cc0fdd036ff2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga40b7218f59d12deb9962cc0fdd036ff2">&#9670;&nbsp;</a></span>JCStorageReason</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga40b7218f59d12deb9962cc0fdd036ff2">JCStorageReason</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>文件传输错误枚举 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2aeca33d3eb89c20fe459b8d72fd57667b"></a>JCStorageReasonNone&#160;</td><td class="fielddoc"><p>无异常 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2a57a76aaa6ca7b283795cc5035f0e4ee1"></a>JCStorageReasonNotLogin&#160;</td><td class="fielddoc"><p>未登陆 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2a6049bcd1162391f0d5305204d84638ba"></a>JCStorageReasonNetWork&#160;</td><td class="fielddoc"><p>网络异常 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2a25a6dcb95feea6fee8f48421d00846af"></a>JCStorageReasonTooLarge&#160;</td><td class="fielddoc"><p>文件太大 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2a7fdf5beb7217db17f5cbeebae4cc6dd7"></a>JCStorageReasonTimeOut&#160;</td><td class="fielddoc"><p>超时 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2ab57782e014dd3abff1305324a6b096de"></a>JCStorageReasonExpire&#160;</td><td class="fielddoc"><p>文件过期 </p>
</td></tr>
<tr><td class="fieldname"><a id="gga40b7218f59d12deb9962cc0fdd036ff2a57d3bae776d11d00e1214962e2371a47"></a>JCStorageReasonOther&#160;</td><td class="fielddoc"><p>其他错误 </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="ga73d635d6a613c3b631075cb71ebba63e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga73d635d6a613c3b631075cb71ebba63e">&#9670;&nbsp;</a></span>createJCStorage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">JCSDK_API <a class="el" href="class_j_c_storage.html">JCStorage</a>* createJCStorage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_j_c_client.html">JCClient</a> *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_j_c_storage_callback.html">JCStorageCallback</a> *&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>创建 <a class="el" href="class_j_c_storage.html">JCStorage</a> 对象</p>
<p><a class="el" href="class_j_c_storage.html">JCStorage</a> 的所有接口函数，如无特殊说明，都建议在主线程调用</p>
<dl class="section note"><dt>注解</dt><dd><ul>
<li>调用此方法创建 <a class="el" href="class_j_c_storage.html">JCStorage</a> 对象后，期间没有调用过 <a class="el" href="group___xE6_x96_x87_xE4_xBB_xB6_xE5_xAD_x98_xE5_x82_xA8_xE6_xA8_xA1_xE5_x9D_x97.html#ga4b8c62e07d32edcd5aa30b0951449b59">destroyJCStorage</a> 方法销毁对象，然后又重复调用此方法，会直接返回第一次创建的 <a class="el" href="class_j_c_storage.html">JCStorage</a> 对象</li>
<li>调用此方法前确保 <a class="el" href="class_j_c_client.html">JCClient</a> 已完成初始化，即 <a class="el" href="class_j_c_client.html#a9c45eac84e61df792573e9a1431c2c1d">getState</a> 方法获取的状态值不等于 <a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga8b1b44e57fff02634fd4637428a70020a555237c15a4b12568003ebe8af59de24">JCClientReasonSDKNotInit</a></li>
</ul>
</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td><a class="el" href="class_j_c_client.html">JCClient</a> 对象 </td></tr>
    <tr><td class="paramname">callback</td><td><a class="el" href="class_j_c_storage_callback.html">JCStorageCallback</a> 对象，用于回调相关通知 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回 <a class="el" href="class_j_c_storage.html">JCStorage</a> 对象 </dd></dl>

</div>
</div>
<a id="ga4b8c62e07d32edcd5aa30b0951449b59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4b8c62e07d32edcd5aa30b0951449b59">&#9670;&nbsp;</a></span>destroyJCStorage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">JCSDK_API void destroyJCStorage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>销毁 <a class="el" href="class_j_c_storage.html">JCStorage</a> 对象 </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
